package com.ltedu.course.domain.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ltedu.common.serializer.BigDecimalJsonDeserializer;
import com.ltedu.common.serializer.BigDecimalJsonSerializer;
import com.ltedu.common.serializer.LongJsonDeserializer;
import com.ltedu.common.serializer.LongJsonSerializer;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @className: CourseDo
 * @auther: Jerry
 * @date: 2020/12/8 15:10
 * @desctiption: TODO
 * @version: 1.0
 */
public class CourseDO {

    /**
     * id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long id;

    /**
     * 课程标题
     */
    private String title;

    /**
     * 讲师id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long teacherId;

    /**
     * 课程类别
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long categoryId;

    /**
     * 课程类别名称
     */
    private String categoryName;

    /**
     * 课程类别父id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long categoryParentId;

    /**
     * 是否上架(1:上架，0:下架)
     */
    private Integer saleState;

    /**
     * 状态(1:正常，0:禁用)
     */
    private Integer state;

    /**
     * 1 表示删除，0 表示未删除
     */
    private Integer isDeleted;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 课程背景图
     */
    private String logo;

    /**
     * 是否免费：1免费，0收费
     */
    private Integer isFree;

    /**
     * 原价
     */
    @JsonDeserialize(using = BigDecimalJsonDeserializer.class)
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal originalPrice;

    /**
     * 折扣价
     */
    @JsonDeserialize(using = BigDecimalJsonDeserializer.class)
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal discountPrice;

    /**
     * 购买人数
     */
    private Integer buyCount;

    /**
     * 已学习人数
     */
    private Integer studyCount;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 更新时间
     */
    private Date gmtModified;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Long getCategoryParentId() {
        return categoryParentId;
    }

    public void setCategoryParentId(Long categoryParentId) {
        this.categoryParentId = categoryParentId;
    }

    public Integer getSaleState() {
        return saleState;
    }

    public void setSaleState(Integer saleState) {
        this.saleState = saleState;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public Integer getIsFree() {
        return isFree;
    }

    public void setIsFree(Integer isFree) {
        this.isFree = isFree;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public Integer getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(Integer buyCount) {
        this.buyCount = buyCount;
    }

    public Integer getStudyCount() {
        return studyCount;
    }

    public void setStudyCount(Integer studyCount) {
        this.studyCount = studyCount;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }
}
